var events = require('events');
var Emitter = events.EventEmitter;

function Dog(dogObj){
    this.name = dogObj.name;
    this.energy = dogObj.energy;
}

Dog.prototype = Emitter.prototype;
Dog.prototype.bark = function(){
    console.log(this.name + "  bark!!  " + "energy: " + this.energy);
}

module.exports = Dog;